<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>	
<%@ include file="/commons/global.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>  
    <title>新增用户</title>
	 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <%@ include file="/commons/basejs.jsp"%> 
	

  </head>
  <style>
   .z-body{
	padding-left: 10%;
	padding-right: 10%;
	padding-top: 5%
	}
</style>
  <body>

 <form class="layui-form layui-form-pane">
   <div class="z-body">
    <div class="layui-form-item">
         <label class="layui-form-label">登录名</label>
         <div class="layui-input-block">
              <input name="id" type="hidden"  value="${user.id}">
              <input  class="layui-input" disabled="disabled" type="text" name="loginName"  value="${user.loginName}">
         </div>
    </div>
     <div class="layui-form-item">
         <label class="layui-form-label">姓名</label>
         <div class="layui-input-block">
              <input  class="layui-input" type="text" name="name" required  lay-verify="required" placeholder="请输入姓名" value="${user.name}">
         </div>
    </div>
    <div class="layui-form-item">
         <label class="layui-form-label">年龄</label>
         <div class="layui-input-block">
              <input  class="layui-input" type="text" name="age" required  lay-verify="required" placeholder="请输入年龄" value="${user.age}"/>
         </div>
    </div>
    <div class="layui-form-item">
         <label class="layui-form-label">电话</label>
         <div class="layui-input-block">
              <input  class="layui-input" type="text" name="phone" required  lay-verify="required" placeholder="请输入电话" value="${user.sex}"/>
         </div>
    </div>
    <div class="layui-form-item" pane>
         <label class="layui-form-label">性别</label>
         <div class="layui-input-block">
              <input type="radio" name="sex" value="男" title="男" <c:if test="${user.sex == 0}"> checked </c:if> />
              <input type="radio" name="sex" value="女" title="女"  <c:if test="${user.sex == 1}"> checked </c:if> />
         </div>
    </div>
    <div class="layui-form-item">
         <label class="layui-form-label">部门</label>
         <div class="layui-input-block">
              <input  class="layui-input" type="text" name="organizationName" disabled="disabled"  placeholder="请输入性别" value="${user.organizationName}">
         </div>
    </div>
    <div class="layui-form-item">
         <label class="layui-form-label">角色</label>
         <div class="layui-input-block">
              <input  class="layui-input" type="text" name="role" disabled="disabled" placeholder="请输入角色" value="${user.roleNames}">
         </div>
    </div>
    
     <div class="layui-form-item">
         <label class="layui-form-label">用户类型</label>
         <div class="layui-input-block">
              <input  class="layui-input" type="text" name="status" disabled="disabled"  <c:if test="${user.status == 0}"> value="正常" </c:if>  value="禁用"  >
         </div>
    </div>
      <div style="height: 60px"></div>
     </div>
     <div  class="" style="width: 100%;height: 42px;background-color: white;border-top:1px solid #e6e6e6;position: fixed;bottom: 1px;margin-left:0px;padding-top:6px"> 
      <div class="layui-form-item" style=" float: right;margin-right: 10%">
      <button  class="layui-btn" lay-filter="detailUser" lay-submit="">修改</button>
      <button  class="layui-btn layui-btn-primary" id="close" onclick="dream_close()">取消</button>
      </div>
  </div>
</form>

<script type="text/javascript">
layui.use('form', function(){
  //只有执行了这一步，部分表单元素才会自动修饰成功
  var form = layui.form; 
  //但是，如果HTML是动态生成的，自动渲染就会失效
  //因此你需要在相应的地方，执行下述方法来手动渲染，跟这类似的还有 element.init();
  form.render();
});      
</script>
  </body>
</html>
